#!/bin/sh

currentDate=$(date +'%Y-%m-%d')
fileName=audit_samba.log
newFileName=$currentDate$fileName
cd /var/log/

ftp -n www.nzs.po.opole.pl<<END_SCRIPT
user ftp4nzs Go5eerahwi
put ./audit_samba_current.log ./$newFileName
quit
END_SCRIPT

rm -f ./audit_samba_current.log
service syslog-ng restart

exit 0